From 2d5fa7852864820422e01457f6405350d78e23fd Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Wed, 19 Sep 2012 15:41:19 -0400 Subject: [PATCH] spinbutton: fix style context path for internal buttons We were adding one child too much to the style context path when generating it for the internal buttons, which in turn caused sibling selectors from the theme such as :first-child to apply to both buttons under certain circumstances. Spotted by Lapo Calamandrei. --- gtk/gtkspinbutton.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index 915f8ba6f3..bc1e4a8224 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -771,15 +771,9 @@ gtk_spin_button_panel_nthchildize_context (GtkSpinButton *spin_button, gtk_widget_path_iter_add_class (siblings_path, down_pos, GTK_STYLE_CLASS_SPINBUTTON); if (panel == priv->down_panel) - { - gtk_widget_path_append_with_siblings (path, siblings_path, up_pos); - gtk_widget_path_append_with_siblings (path, siblings_path, down_pos); - } + gtk_widget_path_append_with_siblings (path, siblings_path, down_pos); else - { - gtk_widget_path_append_with_siblings (path, siblings_path, down_pos); - gtk_widget_path_append_with_siblings (path, siblings_path, up_pos); - } + gtk_widget_path_append_with_siblings (path, siblings_path, up_pos); gtk_style_context_set_path (context, path); gtk_widget_path_unref (path); -- 2.30.2